﻿@model MobileSales.Model.Tasks.Task


@{
    View.Title = Strings.Tasks + " - " + Strings.Details;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>@Strings.Tasks &nbsp;&raquo;&nbsp; @Strings.Details</h2>

<fieldset>
    <legend>@Strings.Fields</legend>

    @if (Model.ClientId.HasValue)
    {
    <div class="display-label">@ModelStrings.Client</div>
    <div class="display-field">@Html.ClientIdentity(Model.ClientId.Value)</div>
    }

    <div class="display-label">@ModelStrings.Info</div>
    <div class="display-field">@Model.Info</div>

    <div class="display-label">@ModelStrings.Priority</div>
    <div class="display-field">@Model.Priority</div>

    <div class="display-label">@ModelStrings.CreationDate</div>
    <div class="display-field">@String.Format("{0:g}", Model.CreationDate)</div>

    <div class="display-label">@ModelStrings.ModificationDate</div>
    <div class="display-field">@String.Format("{0:g}", Model.ModificationDate)</div>

    <div class="display-label">@ModelStrings.StartTime</div>
    <div class="display-field">@String.Format("{0:g}", Model.StartTime)</div>

    <div class="display-label">@ModelStrings.EndTime</div>
    <div class="display-field">@String.Format("{0:g}", Model.EndTime)</div>

    <div class="display-label">@ModelStrings.RealStartTime</div>
    <div class="display-field">@String.Format("{0:g}", Model.RealStartTime)</div>

    <div class="display-label">@ModelStrings.RealEndTime</div>
    <div class="display-field">@String.Format("{0:g}", Model.RealEndTime)</div>

    <div class="display-label">@ModelStrings.StartPositionLatitude</div>
    <div class="display-field">@String.Format("{0:F}", Model.StartPositionLatitude)</div>

    <div class="display-label">@ModelStrings.StartPositionLongitude</div>
    <div class="display-field">@String.Format("{0:F}", Model.StartPositionLongitude)</div>

    <div class="display-label">@ModelStrings.EndPositionLatitude</div>
    <div class="display-field">@String.Format("{0:F}", Model.EndPositionLatitude)</div>

    <div class="display-label">@ModelStrings.EndPositionLongitude</div>
    <div class="display-field">@String.Format("{0:F}", Model.EndPositionLongitude)</div>

    <div class="display-label">@ModelStrings.TaskStatus</div>
    <div class="display-field">@Model.TaskStatus.Name</div>

    <div class="display-label">@ModelStrings.TaskType</div>
    <div class="display-field">@Model.TaskType.Name</div>
</fieldset>
<p>
    @Html.ActionLink(Strings.Edit, "Edit", new { id = Model.Id }, new { @class = "icon-button edit-icon" }) |    
    @Html.ActionLink(Strings.BackToList, "Details", "Schedules", new { employeeId = ViewData["employeeId"], date = Model.StartTime.ToShortDateString() }, new { @class = "icon-button prev-icon" })
    
</p>
